<?php
if (!defined('EXPONENT')) exit('');

    if (exponent_permissions_check('configuration',exponent_core_makeLocation('administrationmodule'))) {
        global $db;        
        $object = $db->selectObject('profilemodule_global_config',"1=1");        
        $object->cache = trim($_REQUEST['cache']);
        $object->last_time = time();
        $object->max_item_page = trim($_REQUEST['max_item_page']);
        if($object->id)
        $db->updateObject($object,'profilemodule_global_config','1=1');
        else
        $db->insertObject($object,'profilemodule_global_config');
        exponent_flow_redirect();
    }
    else 
    echo exponent_http_error(403);
  
?>